#!/usr/bin/env php
<?php
/**
 * Phanbook : Delightfully simple forum and Q&A software
 *
 * Licensed under The BSD License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @link    http://phanbook.com Phanbook Project
 * @since   1.0.0
 * @author  Phanbook <hello@phanbook.com>
 * @license https://github.com/phanbook/phanbook/blob/master/LICENSE.txt
 */

use Phanbook\Common\Application;

// Register The Auto Loader
require __DIR__ . '/bootstrap/autoloader.php';

// Create the Application
$app = new Application('cli');

$console = $app->getApplication();
$console->setArgs($argv, $argc);

try {
    $console->run();
} catch (Exception $e) {
    fwrite(STDERR, $e->getMessage() . PHP_EOL);
    exit(1);
}
